<?=isset($header) ? $header : ''?>
<div id="content">
	<div class="form_style">
		<!-- nav1 start-->
			<table>
				<thead>
					<tr>
						<th>物件編號/市調編號</th>
						<th>物件狀態/市調狀態</th>
						<th>物件案名</th>
						<th>房屋售價/房屋租金</th>
						<th>主建物面積</th>
						<th>附屬建物面積</th>
						<th>公設</th>
						<th>車位</th>
						<th>每月管理費</th>
						<th width="40px">操作</th>
					</tr>
				</thead>
				<tbody id="page_content">
					<?php
					if(!empty($result))
					foreach($result as $name => $val){
					?>
					<tr>
						<td><?=$val->object_no."/".$val->market_survey_no?></td>
						<td>
							<?php 
								
								if(!empty($val->object_state)){
									echo $object_state[$val->object_state];
								}

								echo "/";
								
								if(!empty($val->market_research_status)){
									echo $market_state[$val->market_research_status];
								}

							?>
						</td>

						<td>
							<?php  
								

								if( is_numeric($val->case_name)) {
									if($val->case_name!=0){
										if(!empty($building_name[$val->case_name]))
										echo $building_name[$val->case_name]; 
									}	
								}elseif(!empty($val->case_name)){ 
									echo $val->case_name; 
								}
							?>
						</td>

						<td><?=intval($val->sale_total)."/".intval($val->rent_total)?></td>
						<td><?=intval($val->main_building_area)."坪"?></td>
						<td><?=intval($val->subsidiary_building_area)."坪"?></td>
						<td><?=$val->postulate?></td>
						<td>
						<?php

						$parking_typesss = array();
						
						foreach($parking_type as $flg=>$row){
								
							$parking_typesss[$row->parking_type_id] = $row->value;

						}
							if($val->parking_type1>1){
								echo $parking_typesss[$val->parking_type1];"型 - ";
							}

							echo $val->parking_number1."個";
						
						?>
						</td>
						<td><?=$val->monthly_management_fee?></td>
						<td width="40px">
						<a href="<?=site_url('/object/info/'.$val->object_id)?>"><img src="/images/magnifier.png" title="查看" border="0" /></a>
						</td>
					</tr>
					<?
					}
					?>					
				</tbody>
				<tfoot>
				<tr>
					<td colspan="15">
					

						<div style="float:left;vertical-align:baseline">
						</div>

						<div style="float:right">
							<?php 
							if(!empty($result))
								echo $victor_page; 
							?>			 
						</div>
					</td>
				</tr>
				</tfoot>
			</table>
	</div>
</div>
<?php  
//=isset($footer) ? $footer : ''
?>